package org.prem.spring.exe12.applicationcontexaware;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class Triangle implements ApplicationContextAware, BeanNameAware{
	
	//private String type;
	
	private Point pointA;
	private Point pointB;
	private Point pointC;
	private ApplicationContext context = null;
	
/*	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}*/


	public Point getPointA() {
		return pointA;
	}


	public void setPointA(Point pointA) {
		this.pointA = pointA;
	}


	public Point getPointB() {
		return pointB;
	}


	public void setPointB(Point pointB) {
		this.pointB = pointB;
	}


	public Point getPointC() {
		return pointC;
	}


	public void setPointC(Point pointC) {
		this.pointC = pointC;
	}


	public void draw(){
		//System.out.println(getType()+" Triangle draw");
		System.out.println("PointA--->"+this.pointA.getX()+","+this.pointA.getY());
		System.out.println("PointB--->"+this.pointB.getX()+","+this.pointB.getY());
		System.out.println("PointC--->"+this.pointC.getX()+","+this.pointC.getY());
	}


	@Override
	public void setApplicationContext(ApplicationContext context)
			throws BeansException {
		// TODO Auto-generated method stub
		this.context = context;
		System.out.println("inside set applicationcontext");
	}


	@Override
	public void setBeanName(String beanName) {
		// TODO Auto-generated method stub
		System.out.println("Bean name is: "+beanName);
	}
}
